package com.sky.controller.user.user;

import com.sky.result.Result;
import com.sky.service.UserService;
import com.sky.vo.UserLoginVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author 42
 * @date 2025/3/28
 * @Description 用户模块接口
 */
@RestController
@Api(tags= "用户端接口")
@RequestMapping("/user/user")
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * 用户登录接口
     * @param code
     * @return
     */
    @PostMapping("/login")
    public Result<UserLoginVO> login(@RequestBody Map<String,String> codeMap){
        return userService.login(codeMap);
    }

}
